package lab02.text11;

/**
 * Created by dell on 2017/10/25.
 */
public class Rectangle implements Printx{
    double length;
    double width;
    Rectangle(){}
    double area(){
        return length*width;
    }
    double perimeter(){
        return 2*length+2*width;
    }
    public void setLength() {
        this.length = length;
    }
    public void setWidth() {
        this.width = width;
    }
    public double getLength() {
        return length;
    }
    public double getWidth() {
        return width;
    }
    @Override
    public void PrintMyWay() {
        System.out.println("length："+length+
                "width："+width+"area："+area()+
                "perimeter："+perimeter());

    }
}
